﻿@model Orion.Models.NewsArticle
           
@{
    ViewBag.Title = "IRIS - Innranet - Breyta grein - " + Model.Title;
    Layout = "~/Views/Shared/_WorkLayout.cshtml";
}

<section id="main_content_wrapper">
<h1>Breyta greininni @Model.Title</h1>

@{ Html.EnableClientValidation(); }

@using (Html.BeginForm("EditNewsArticle", "WorkNewsArticle", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)

    @Html.HiddenFor( model=>model.ID )
<fieldset>
        <legend>Breyta frétt</legend>
        <ol>
            <li>
                @Html.LabelFor(model => model.Title, "Titill")
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </li>
            <li>
                @Html.LabelFor(model => model.TextBody, "Meginmál")
                @Html.TextAreaFor(model => model.TextBody)
                @Html.ValidationMessageFor(model => model.TextBody)
            </li>
            <li>
                <img src="@Model.Picture" alt="Mynd af notanda" />
                <label for="file">Mynd</label>
                <input type="file" name="file" id="file" />
            </li>
            <li>
                <label for="Valid">Sýnileg</label>
		        <select id="Valid" name="Valid">            
                    <option value="true" >Já</option>
                    <option value="false">Nei</option>
		        </select>
            </li>

            
            @Html.HiddenFor(model => model.ContentType)
            @Html.HiddenFor(model => model.Author)

            <input type="submit" value="Birta" />
        </ol>
    </fieldset>
}


</section>